<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>寇新峰的demo9-1</title>
</head>
<style>
#a1 {
    width: 200px;
    height: 300px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}
.a2 {
    width: 200px;
    height: 120px;
    position: absolute;
    top: 300px;
    color: white;
    box-sizing: border-box;
    padding-left: 10px;
    transition: all 1S ease;
    -webkit-transition: all 1S ease;
    background-color: rgba(8, 8, 8, .3);
}
#a1:hover .a2{
    transform: translate(0px,-120px); 
    -webkit-transform: translate(0px,-120px);
}
</style>
<body>
    <div id="a1">
        <img src="./寇新峰的动画图片/banner01.jpg" alt="">
        <div class="a2">
            <h4>文字标题</h4>
            鼠标移入图片时，图片说明滑入。
        </div>
    </div>
        
</body>
</html>